Skip to content

Fix adding element to multiline array after inline array in yaml#1665

Open
pincher2012 wants to merge 2 commits intosymfony:1.xfrom
pincher2012:yaml-array-bug
Open

Fix adding element to multiline array after inline array in yaml#1665
pincher2012 wants to merge 2 commits intosymfony:1.xfrom
pincher2012:yaml-array-bug

Conversation

@pincher2012
Copy link

@pincher2012 pincher2012 commented Feb 25, 2025

fixes #1666

@pincher2012 pincher2012 force-pushed the yaml-array-bug branch 3 times, most recently from 310f1dc to 46ce4e8 Compare February 3, 2026 22:56
@pincher2012 pincher2012 changed the title Failed test for yaml update bug Fix adding element to multiline array after inline array Feb 3, 2026
@pincher2012 pincher2012 changed the title Fix adding element to multiline array after inline array Fix adding element to multiline array after inline array in yaml Feb 3, 2026
messenger:
routing:
App\Messages\OldMessage: [ transport1, transport2 ]
App\Messages\NewMessage: async No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand the missing newline at EOF is related to the issue.

What do you think of making YamlSourceManipulator always ensure there is an empty newline at EOF? That is our style rules.

Suggested change
App\Messages\NewMessage: async
App\Messages\NewMessage: async

Copy link
Author

@pincher2012 pincher2012 Feb 4, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the review!

Personally, I prefer to leave a new line at the end of the file.

I think this bundle could be used in codebases that might not adhere to the generally accepted style in symfony. Should we impose any formatting rules on the user?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

YamlSourceManipulator adding item to the array after array leads to bug

2 participants